import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

public class Test {

    public static void main(String[] args) {

//        测试队列中是否能存放null
        Queue<BinaryTree.TreeNode> queue=new LinkedList<>();
        queue.offer(null);
        queue.offer(null);
        queue.offer(null);
        System.out.println(queue.size());

        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.createTree();
        System.out.println("=====测试是否是完全二叉树====");
        System.out.println(binaryTree.isCompleteTree(root));

        System.out.println("=======非递归前序遍历测试=======");
        binaryTree.preOrderNot(root);

        System.out.println("=======非递归中序遍历测试=======");
        binaryTree.inOrderNot(root);

        System.out.println("=======非递归后序遍历测试=======");
        binaryTree.postOrderNot(root);
    }


    public static void main1(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        Scanner sc=new Scanner(System.in);
        while(sc.hasNextLine()) {
            String str=sc.nextLine();
            BinaryTree.TreeNode root=binaryTree.createTree(str);
            binaryTree.levelOrder(root);
        }
    }
}
